package com.dd.cloud.user.req.drugs;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.dd.cloud.common.annotate.validation.Desc;
import com.dd.cloud.common.annotate.validation.Fee;
import com.dd.cloud.common.annotate.validation.FixedValue;
import com.dd.cloud.common.annotate.validation.Name;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Description: 平台药房excel导入药品数据
 * @ClassName: ExcelAddDrugModel
 * @Author: czg
 * @Date: 2022/9/29 9:55
 * @Version: 1.0
 */
@Data
public class ExcelAddDrugModel {

    /**
     * 药材编码
     */
    @Name(begin = "药品编号", required = false)
    @Excel(name = "药品编号")
    private String drugnum;

    /**
     * 药材名称
     */
    @NotBlank(message = "请填写必填项药品名称内容")
    @Excel(name = "*药品名称")
    @Name(begin = "药品名称")
    private String herbName;

    /**
     * 用法及注意事项
     */
    @Name(begin = "用法及注意事项", required = false)
    @Excel(name = "用法及注意事项")
    private String precautions;

    /**
     * 规格
     */
    @NotBlank(message = "请填写必填项规格内容")
    @Name(begin = "规格")
    @Excel(name = "*药品规格")
    private String specification;

    /**
     * 药材单位
     */
    @NotBlank(message = "请填写必填项药品单位内容")
    @FixedValue(strValues = {"g","条","具","枚","片", "个","对","毫升","只","粒"})
    @Excel(name = "*药品单位")
    private String useUnit;

    /**
     * 药材类型 1药材原料 2中成药
     */
    private Integer type;


    /**
     * 产地
     */
    @Name(begin = "药品产地", required = false)
    @Excel(name = "产地")
    private String origin;

    /**
     * 药材单价/售价
     */
    @NotNull(message = "请填写必填项药材售价内容")
    @Excel(name = "*销售单价(元/单位)")
    //@Fee(begin = "*销售单价(元/单位)")
    private BigDecimal price;

    /**
     * 药材原价/成本价
     */
    //@Fee(begin = "药材原价", required = false)
    @Excel(name = "成本单价(元/单位)")
    private BigDecimal originalPrice;

    /**
     * 药品折扣价
     */
    @Excel(name = "*折扣后单价(元/单位)")
    private BigDecimal publicPrice;


}
